//
//  DataManager.h
//  OneDay
//
//  Created by lanou3g on 15/11/4.
//  Copyright © 2015年 oneDay. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DataManager : NSObject

@property (nonatomic, strong) FMDatabase *database;

+ (DataManager *)shareManager;

// 创建表
- (void)creatTable;

// 插入
- (void)insertDatabaseWithTitle:(NSString *)title imageUrl:(NSString *)imageUrl needString:(id)needStr num:(NSInteger)num;

// 删除
- (void)deleteWithTitle:(NSString *)title num:(NSInteger)num;

// 查询单个
- (NSString *)selectWithNum:(NSInteger)num title:(NSString *)title;

// 查询全部
- (NSMutableArray *)selectWithNum:(NSInteger)num;

// 传进来 判断状态
- (void)isLogin:(BOOL)isLogin;

- (BOOL)isLogin;

// 传进来账号 把账号持久化
- (void)userName:(NSString *)userName;

// 返回账号
- (NSString *)userName;

// 传进来密码  把密码持久化
- (void)userPassword:(NSString *)userPassword;

- (NSString *)userPassword;


@end
